$input texcolor, v_texcoord0, worldpos

#include <bgfx_shader.sh>
#include <Fuctions_MLYX.glsl>

uniform vec4 FogAndDistanceControl;
uniform vec4 ViewPositionAndTime;
uniform vec4 FogColor;

SAMPLER2D(s_MatTexture, 0);

void main() {
    vec4 diffuse = texture2D(s_MatTexture, v_texcoord0);
    vec3 CaeloFinal;
    vec3 SunPos = vec3(-0.8,0.5,0.0);
    CaeloFinal = EnderCaelo(CaeloFinal, worldpos, SunPos);
    CaeloFinal = FilmToneMapping(CaeloFinal);
    diffuse.rgb = CaeloFinal;
  gl_FragColor = vec4(diffuse.rgb, 1.0);
}